package com.strongwell.awe.service.impl;

import com.strongwell.awe.dao.MainMapper;
import com.strongwell.awe.model.TbUsersExample;
import com.strongwell.awe.service.MainService;
import com.strongwell.awe.dao.TbUsersMapper;
import com.strongwell.awe.model.TbUsers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MainServiceImpl implements MainService {

	@Autowired
	private TbUsersMapper usersDao;

	@Autowired
	private MainMapper mainMapper;

	@Override
	public List<TbUsers> selUserList() {
		TbUsersExample example=new TbUsersExample();

		return usersDao.selectByExample(example);
	}

	@Override
	public List<TbUsers> selUsersToday() {
		return mainMapper.selUsersToday();
	}

	@Override
	public List<TbUsers> selUsersYestoday() {
		return mainMapper.selUsersYesterday();
	}


	@Override
	public List<TbUsers> selUsersYearWeek() {
		// TODO Auto-generated method stub
		return mainMapper.selUsersYearWeek();
	}

	@Override
	public List<TbUsers> selUsersMonth() {
		// TODO Auto-generated method stub
		return mainMapper.selUsersMonth();
	}

	@Override
	public int seUserCountBygender(int i) {
		// TODO Auto-generated method stub
		TbUsersExample example=new TbUsersExample();

		List<TbUsers> list = usersDao.selectByExample(example);
		return list.size();
	}

}
